export interface Animal {
  name: string;
}

export interface Dog extends Animal {
  bark(): void;
}

export function makeDogBark(dog: Dog) {
  console.log(dog.name + " says Woof!");
  dog.bark();
}

const myDog: Dog = { name: "Rex", bark: () => console.log("Woof!") };
makeDogBark(myDog);
